package com.game.framework;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;


@Slf4j
public class SpringManager implements IManager {
    @Getter
    private static final SpringManager instance = new SpringManager();

    @Setter
    private  ApplicationContext context;

    @Override
    public void init() {
        log.info("SpringManager init");
        log.info("context {}", context);
    }

    @Override
    public void shutdown() {
    }

    public <T> T getBean(Class<T> object) {
        return context.getBean(object);
    }
}
